﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Web.Script.Services;
using SapB1WebPOS.Model;
using SapB1WebPOS.Utils;

namespace SapB1WebPOS
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        [WebMethod]
        [ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
        public static string GetOnlineUserPassword()
        {
            try
            {
                if (HttpContext.Current.Session["UserPermission"] != null)
                {
                    OnlineUser user = (OnlineUser)HttpContext.Current.Session["UserPermission"];
                    return user.U_Password;
                }
                return string.Empty;
            }
            catch (Exception ex)
            {
                Log.WriteException(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "SystemError", ex);
                return ex.Message;
            }
        }
    }
}
